Imperative Object-Based Calculi in Co-inductive Type Theories
نویسندگان
چکیده
We discuss the formalization of Abadi and Cardelli’s impς , a paradigmatic object-based calculus with types and side effects, in Co-Inductive Type Theories, such as the Calculus of (Co)Inductive Constructions (CC). Instead of representing directly the original system “as it is”, we reformulate its syntax and semantics bearing in mind the proof-theoretical features provided by the target metalanguage. On one hand, this methodology allows for a smoother implementation and treatment of the calculus in the metalanguage. On the other, it is possible to see the calculus from a new perspective, thus having the occasion to suggest original and cleaner presentations. We give hence a new presentation of impς , exploiting natural deduction semantics, (weak) higher-order abstract syntax, and, for a significant fragment of the calculus, coinductive typing systems. This presentation is easier to use and implement than the original one, and the proofs of key metaproperties, e.g. subject reduction, are much simpler. Although all proof developments have been carried out in the Coq system, the solutions we have devised in the encoding of and metareasoning on impς can be applied to other imperative calculi and proof environments with similar features.
منابع مشابه
On the Formalization of Imperative Object-based Calculi in (Co)Inductive Type Theories
In this paper, we study the formalization of Abadi and Cardelli’s impς , a representative object-based calculus with types and side effects, in interactive proof assistants based on (Co)Inductive Type Theories, like Coq. In order to make the formal development of the theory of impς easier, we reformulate its static and dynamic semantics taking most advantage of the features provided by CC, the ...
متن کاملTowards a Programming Language Ontology
We examine the role of semantic theory in determining the ontology of programming languages. We explore how different semantic perspectives result in different ontologies. In particular, we compare the ontological implications of set-theoretic versus type-theoretic semantics. 1 Programming Languages Programming languages (PLs) combine two, not always distinct, facilities: data structures (e.g.,...
متن کاملEmbedding an object calculus in the unifying theories of programming
Hoare and He’s Unifying Theories of Programming (UTP) provides a rich model of programs as relational predicates. This theory is intended to provide a single framework in which any programming paradigms, languages, and features, can be modelled, compared and contrasted. The UTP already has models for several programming formalisms, such as imperative programming, higher-order programming (e.g. ...
متن کاملAn Imperative Object Calculus Basic Typing and Soundness
We develop an imperative calculus of objects that is both tiny and expressive. Our calculus provides a minimal setting in which to study the operational semantics and the typing rules of object-oriented languages. We prove type soundness using a simple subject-reduction approach.
متن کاملAn Imperative , First - Order Calculus withObject
This paper presents an imperative object calculus designed to support class-based programming via a combination of extensible objects and encapsulation. This calculus simpliies the language presented in 17] in that, like C++ and Java, it chooses to support an imperative semantics instead of method specialization. We show how Java-style classes and \mixins" may be coded in this calculus, prove a...
متن کامل